<template>
<div class="add">
    <h1>This is an add page</h1>
    <input type="number" v-model="num1" placeholder="Enter first number">
    <input type="number" v-model="num2" placeholder="Enter second number">
    <button @click="calculateSum">Add</button>
    <p>Result: {{ result }}</p>
</div>
</template>

<script>
export default {
    data() {
        return {
            num1: 0,
            num2: 0,
            result: 0
        };
    },
    methods: {
        calculateSum() {
            this.result = parseFloat(this.num1) + parseFloat(this.num2);
        }
    }
};
</script>

<style scoped>
.add {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.add input {
    margin: 5px 0;
    padding: 8px;
    width: 200px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.add button {
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.add button:hover {
    background-color: #0056b3;
}

.add p {
    margin-top: 10px;
    font-size: 16px;
    font-weight: bold;
}
</style>